@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }

  & {
    scrollbar-width: none;
    scrollbar-color: #d3dce6 #99a9bf ; // 滚动轨道颜色  滚动滑块颜色
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin calcPercentage($propertyName,$actualLength,$totalLength) {
  #{$propertyName}: ($actualLength/$totalLength)*100%
}

@mixin extend-click($x: -8px, $y: -8px) {
  position: relative;

  &:after {
    position: absolute;
    z-index: 2;
    content: "";
    left: $x;
    right: $x;
    top: $y;
    bottom: $y;
    width: 100%;
    height: 100%;
    margin: auto;
  }

}

@mixin no-wrap() {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

@mixin no-wraps($l: 2) {
  display: flex;
  display: -webkit-flex;
  display: -webkit-box-flex;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $l; //需要控制的文本行数
  text-overflow: ellipsis;
  overflow: hidden;
}

@mixin extend-after() {
  position: relative;

  &:after {
    position: absolute;
    display: block;
    content: "";
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
  }

}
